/**
 * @Auther: ChenforCode
 * @Date: 2018/9/11 12:07
 * @Description:
 */
package cn.chenforcode.entity;

import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
import java.sql.Timestamp;

@Entity
public class AdminStuRecord {
    private String aname;
    private String sno;
    private Timestamp asDate;

    @Basic
    @Column(name = "ANAME")
    public String getAname() {
        return aname;
    }

    public void setAname(String aname) {
        this.aname = aname;
    }

    @Basic
    @Column(name = "SNO")
    public String getSno() {
        return sno;
    }

    public void setSno(String sno) {
        this.sno = sno;
    }

    @Id
    @Column(name = "AS_DATE")
    public Timestamp getAsDate() {
        return asDate;
    }

    public void setAsDate(Timestamp asDate) {
        this.asDate = asDate;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;

        AdminStuRecord that = (AdminStuRecord) o;

        if (aname != null ? !aname.equals(that.aname) : that.aname != null) return false;
        if (sno != null ? !sno.equals(that.sno) : that.sno != null) return false;
        if (asDate != null ? !asDate.equals(that.asDate) : that.asDate != null) return false;

        return true;
    }

    @Override
    public int hashCode() {
        int result = aname != null ? aname.hashCode() : 0;
        result = 31 * result + (sno != null ? sno.hashCode() : 0);
        result = 31 * result + (asDate != null ? asDate.hashCode() : 0);
        return result;
    }

    public AdminStuRecord(String aname, String sno, Timestamp asDate) {
        this.aname = aname;
        this.sno = sno;
        this.asDate = asDate;
    }

    public AdminStuRecord() {
    }
}
